﻿@using UcAsp.WorkFrame;
@model UcAsp.Models.SiteSetting
@{
    ViewBag.Title = "SetSetting";
    Layout = "~/Views/Shared/_AdminLayOut.cshtml";
    ;
}
<script type="text/javascript">
    
tinymce.init({
    selector: "textarea",
    plugins: [
        "advlist autolink lists link image charmap print preview anchor",
        "searchreplace visualblocks code fullscreen",
        "insertdatetime media table contextmenu paste hr upfile"
    ],
    toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent |link image upfile"
    
});
$(document).ready(function () {
    $("#savesiteseting").click(function () {
        $.post("/Admin/SaveSetSetting", { SiteName: $("input[name='SiteName']").val(), SiteDescription: $("input[name='SiteDescription']").val(), SiteUrl: $("input[name='SiteUrl']").val(), PointsRate: $("input[name='PointsRate']").val(), MasterHeader: $("input[name='MasterHeader']").val(), UserHeader: $("input[name='UserHeader']").val(), SearchMetaKeywords: $("input[name='SearchMetaKeywords']").val(), SearchMetaDescription: $("input[name='SearchMetaDescription']").val(), Footer: tinyMCE.get("Footer").getContent(), Copyright: tinyMCE.get("Copyright").getContent() }, function () {
            alert("内容已更新");
        })
    })
})

</script>
<h2>网站设置</h2>
<form action="#" method="post">                 
            <p>
              <label>网站名称</label>
                 <input class="text-input small-input" type="text" name="SiteName"  value="@Model.SiteName" />
             </p>
              <p>
              <label>网站介绍</label>
                 <input class="text-input large-input" type="text" name="SiteDescription" value="@Model.SiteDescription" />
             </p>
            <p>
              <label>网站地址</label>
                 <input class="text-input small-input" type="text"  name="SiteUrl" value="@Model.SiteUrl" />
             </p>
             <p>
              <label>注册送积分</label>
                 <input class="text-input small-input" type="text" name="PointsRate" value="@Model.PointsRate" />
             </p>
                 <p>
              <label>管理员默认头像</label>
                 <input class="text-input small-input" type="text" name="MasterHeader" value="@Model.MasterHeader" />
             </p>
      <p>
              <label>用户默认头像</label>
                 <input class="text-input small-input" type="text" name="UserHeader" value="@Model.UserHeader" />
             </p>
            <p>
              <label>网站关键词</label>
                 <input class="text-input large-input" type="text"  name="SearchMetaKeywords" value="@Model.SearchMetaKeywords" />
             </p>
             <p>
              <label>网站描述</label>
                 <input class="text-input large-input" type="text" name="SearchMetaDescription" value="@Model.SearchMetaDescription" />
             </p>

            <p>
              <label>友情链接</label>
              <textarea class="text-input textarea wysiwyg"  name="Footer" cols="79" rows="15">@Model.Footer</textarea>
            </p>
           <p>
              <label>网站版权</label>
              <textarea class="text-input textarea wysiwyg"  name="Copyright" cols="79" rows="15">@Model.Copyright</textarea>
            </p>
            <p>
              <input class="button" id="savesiteseting" type="button" value="保存" />
            </p>
            
            <div class="clear"></div>
            <!-- End .clear -->
          </form>